from typing import Any
from strenum import StrEnum
from pydantic import BaseModel, Field
from openai.types.chat.chat_completion import ChatCompletion as ChatCompletion  # noqa
from openai.types.chat.chat_completion_message import (
    ChatCompletionMessage as ChatCompletionMessage,
)  # noqa
from openai.types.chat.chat_completion_tool_param import (
    ChatCompletionToolParam as ChatCompletionToolParam,
)  # noqa
from openai.types.chat.chat_completion_message_param import (  # noqa
    ChatCompletionMessageParam as ChatCompletionMessageParam,
)
from openai.types.chat.chat_completion_message_tool_call import (  # noqa
    ChatCompletionMessageToolCall as ChatCompletionMessageToolCall,
)
from openai.types.chat.chat_completion_tool_choice_option_param import (  # noqa
    ChatCompletionToolChoiceOptionParam as ChatCompletionToolChoiceOptionParam,
)
from openai.types.chat.completion_create_params import (
    ResponseFormat as ResponseFormat,
)  # noqa
from openai import NotGiven as NotGiven  # noqa


class QuestionType(StrEnum):
    true_false = "判断题"
    short_answer = "简答题"
    single_choice = "单选题"
    fill_in_blank = "填空题"
    multiple_choice = "多选题"


class APIResponse(BaseModel):
    """通用API响应模型"""

    code: int = Field(default=200, description="响应状态码")
    data: Any = Field(..., description="响应数据")
    msg: str = Field(default="", description="响应数据")
